<template>
  <div class="image-link-wrapper">
    <div class="image-card">
      <a :href="module.props.link" target="_blank" rel="noopener noreferrer">
        <img :src="module.props.image" alt="图片" class="image-link" />
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ImageLinkModule',
  props: ['module'],
}
</script>

<style scoped>
.image-link-wrapper {
  background-color: rgb(242, 246, 252);
  padding: 12px;
  display: flex;
  justify-content: center;
}

.image-card {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.image-link {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}
</style>
